<?php
    if(!empty($divisi)){
        echo '<table>';
        for ($i=0;$i<count($divisi);$i++){
            echo '';
        }
        echo '</table>';
    }
    
?>
<link rel="stylesheet" href="<?php echo base_url() ?>css/demo_page.css" type="text/css" title="ui-theme" />
<link rel="stylesheet" href="<?php echo base_url() ?>css/demo_table.css" type="text/css" title="ui-theme" />
<!--<script type="text/javascript" language="javascript" src="<?php echo base_url() ?>js/jquery.js"></script>-->
<script type="text/javascript" language="javascript" src="<?php echo base_url() ?>js/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf-8">
        $(document).ready(function() {
                $('#example').dataTable();
        } );
</script>
<?php if(!empty($divisi)){ ?>
<div id="dt_example" class="ex_highlight_row">
    <div id="container">
        <div id="demo">
            <h1>Daftar Divisi</h1>
            <div style="text-align:center; padding-bottom:1em;">
                    <a href="<?php echo base_url()?>progress/admin_con/tambah_divisi">Tambah Divisi</a>
            </div>
            <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
                    <thead>
                            <tr>
                                    <th>No</th>
                                    <th>Nama Divisi</th>
                                    <th>Aksi</th>
                            </tr>
                    </thead>
                    <tbody>
                        <?php
                            for($i=0;$i<count($divisi);$i++){
                                echo '
                                    <tr>
                                            <td class="center">'.($i+1).'</td>
                                            <td>'.$divisi[$i]['NAMA_DIVISI'].'</td>
                                            <td class="center"><a href="'.base_url().'progress/admin_con/edit_divisi/'.$divisi[$i]['ID_DIVISI'].'">Edit</a> | <a href="'.base_url().'progress/admin_con/delete_divisi/'.$divisi[$i]['ID_DIVISI'].'" onclick="return confirm(\'Really delete?\');">Delete</a></td>
                                    </tr>
                                    ';
                            }
                        ?>
                    </tbody>
            </table>
        </div>
    </div>
</div>
<?php }?>
